﻿@model  WeChatParking.Entity.User_info
@{
    ViewBag.Title = "修改密码";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
<div class="ibox ">

    <div class="ibox-title">
        <h5>修改密码</h5>
    </div>

    <div class="ibox-content">
        <div class="row">

            <form id="form-changepass" class="form-horizontal col-sm-6" method="post" action="/Admin/ChangePassPost">
                <div class="form-group">
                    <label class="col-sm-3 control-label">企业代码：</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" value="@Model.EnterpriseCode" readonly disabled />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">用户代码：</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" value="@Model.UserCode" readonly disabled />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">用户名称：</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" value="@Model.UserName" readonly disabled />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">原密码：</label>
                    <div class="col-sm-9">
                        <input type="password" name="oldpass" class="form-control" id="oldpass" placeholder="请输入原密码" required>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">新密码：</label>
                    <div class="col-sm-9">
                        <input type="password" name="newpass" id="newpass" class="form-control" placeholder="请输入新密码" required maxlength="20" minlength="5">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">新密码确认：</label>
                    <div class="col-sm-9">
                        <input type="password" equalto="#newpass" class="form-control" placeholder="请再次输入密码" required maxlength="20" minlength="5">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-8 col-sm-offset-3">
                        <button class="btn btn-primary" type="submit">提交</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
@section BodyFooter{
    <script>
        $(function () {
            $.validator.setDefaults({
                submitHandler: function (form) {
                    $(form).ajaxSubmit(function (d) {
                        toastr.info('密码更新成功');
                    });
                }
            });

            $('#form-changepass').validate()
        });
    </script>
}
